package com.qiankan.qmsj.viewHolder;

import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * Created by Administrator on 2017/8/15.
 */

public class CommonViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
    private OnRecyclerViewListener onRecyclerViewListener;

    public CommonViewHolder(View itemView) {
        super(itemView);

    }

    @Override
    public void onClick(View view) {
        onRecyclerViewListener.onItemClick(view);
    }

    public interface OnRecyclerViewListener {
        void onItemClick(View view);
    }

    public void setOnRecyclerViewListener(OnRecyclerViewListener onRecyclerViewListener) {
        this.onRecyclerViewListener = onRecyclerViewListener;
        itemView.setOnClickListener(this);
    }
}
